<?php
/**
 * Created by JetBrains PhpStorm.
 * User: cgp
 * Date: 13-11-6
 * Time: 下午5:16
 * To change this template use File | Settings | File Templates.
 */

namespace pft\Sms;


class SmsNotify {
    const REGISTER                 = '/var/www/html/new/d/tpl/sms/register.txt';
    const FORGET                   = '/var/www/html/new/d/tpl/sms/forget.txt';
    const RELATION_SHIP_CREATE     = '/var/www/html/new/d/tpl/sms/relation.txt';

    public static function SendSMS($mobile, $tpl, $soap, $s_r)
    {
//        $tpl_arr = array(
//            '/var/www/html/new/d/tpl/sms/register.txt',
//            '/var/www/html/new/d/tpl/sms/forget.txt',
//            '/var/www/html/new/d/relation.txt'
//        );
        $content = str_replace($s_r['search'],$s_r['replace'], file_get_contents($tpl));
        $r = $soap->Send_SMS_G($mobile,$content);
        return $r;
    }
}